package com.jeesite.modules.dataScreen.web.vo.avition;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel("机场起降对象")
public class AirportInformationUpDownVo {

    @ApiModelProperty("当月机场起降数")
    private List<AirportInformationKVVo<String, Integer>> currentMonth = new ArrayList<>();

    @ApiModelProperty("当年机场起降数据")
    private List<AirportInformationUpDownItem> currentYear = new ArrayList<>();

    public void addItem(int month, List<AirportInformationKVVo<String, Integer>> infos) {
        currentYear.add(new AirportInformationUpDownItem(month, infos));
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class AirportInformationUpDownItem {
        @ApiModelProperty("月份")
        private int month;

        @ApiModelProperty("机场起降数")
        private List<AirportInformationKVVo<String, Integer>> infos;
    }
}
